package edu.columbia.cloudbox.ui;

import java.util.Stack;

public class FilePathOnTab {

	public static Stack<String> currentPath_allFiles = new Stack<String>();

	public static Stack<String> currentPath_savedFiles = new Stack<String>();

	public static Stack<String> currentPath_cachedFiles = new Stack<String>();

	public static String makePath(Stack<String> folders) {

		StringBuilder path = new StringBuilder();
		if (folders.empty())
			return "";

		for (int i = 0; i < folders.size(); i++) {
			path.append("/");
			path.append(folders.get(i));
		}
		return path.toString();
	}

	public static String makeBackPath(Stack<String> folders) {

		folders.pop();

		StringBuilder path = new StringBuilder();
		if (folders.empty())
			return "";

		for (int i = 0; i < folders.size(); i++) {
			path.append("/");
			path.append(folders.get(i));
		}
		return path.toString();
	}
}
